package com.atguigu.gmall.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.order.service.OrderInfoService;
import com.atguigu.gmall.order.mapper.OrderInfoMapper;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo>
    implements OrderInfoService{

    @Override
    public OrderInfo getOrderInfoById(Long id, Long userId) {

        OrderInfo orderInfo = lambdaQuery().eq(OrderInfo::getUserId, userId).eq(OrderInfo::getId, id).one();
        return orderInfo;

    }
}




